<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'relogin.jsp' starting page</title>
	<style>
		body{font-size:12px; margin:0; padding:0; background:#ccc;}
		div{
			margin:200px auto;padding:0; width:400px; height:200px; border:1px #333 solid;background:#666;
		}
		form{
			margin:0 auto auto 70px;
		}
		a{text-decoration:none;}
		#logbutton{width:70px;height:25px;}
	</style>
	<script type="text/javascript">
				function loginForm(){
					var username = document.getElementById("name").value;
					if(username == "" || username == "请输入账号"){
							window.alert("请输入用户名");
							document.getElementById("loginForm").onsubmit();
					}else{
							var password = document.getElementById("pw").value;
		
							if(password == ""){
							window.alert("请输入密码");
							document.getElementById("loginForm").onsubmit();
							}else{
								document.getElementById("loginForm").submit();
							}
					}
				}
	</script>
		
  </head>
  
  <body>
  
  		<div>
  			<form action="login" id="loginForm" method="post">
				 <br />
				 <h6>请先登录：</h6>
				 <span>账号：</span><input type="text" name="name" id="name" value="请输入账号" /> <input value = "登陆" type="button" name="logbutton" id="logbutton" onclick="loginForm()" /><br /><br />
				 <span>密码：</span><input type="password" name="pw" id="pw"/> <a href = "signin.jsp">&nbsp;&nbsp;注册</a>
			</form>
  			
  		</div>
  </body>
</html>
